﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Toolkit="clr-namespace:Microsoft.Phone.Maps.Toolkit;assembly=Microsoft.Phone.Controls.Toolkit" x:Class="GoogleAPIOnWindowsPhone.App" d1p1:Ignorable="d">
  <!--Application Resources-->
  <Application.Resources>
    <local:LocalizedStrings xmlns:local="clr-namespace:GoogleAPIOnWindowsPhone" x:Key="LocalizedStrings" />

    <vm:ViewModelLocator xmlns:vm="clr-namespace:GoogleAPIOnWindowsPhone.ViewModel" x:Key="Locator" d:IsDataSource="True" />
        <Style x:Key="MapSliderStyle" TargetType="Slider">
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="Maximum" Value="10"/>
            <Setter Property="Minimum" Value="0"/>
            <Setter Property="Value" Value="0"/>
            <Setter Property="Background" Value="{StaticResource PhoneChromeBrush}"/>
            <Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Slider">
                        <Grid Background="Transparent">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HorizontalTrack"/>
                                            <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VerticalTrack"/>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="HorizontalFill">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="VerticalFill">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid x:Name="HorizontalTemplate" Margin="{StaticResource PhoneHorizontalMargin}">
                                <Rectangle x:Name="HorizontalTrack" Fill="{TemplateBinding Background}" Height="12" IsHitTestVisible="False" Margin="0,22,0,50"/>
                                <Rectangle x:Name="HorizontalFill" Fill="{TemplateBinding Foreground}" Height="12" IsHitTestVisible="False" Margin="0,22,0,50">
                                    <Rectangle.Clip>
                                        <RectangleGeometry Rect="0, 0, 6, 12"/>
                                    </Rectangle.Clip>
                                </Rectangle>
                                <Path x:Name="HorizontalCenterElement" HorizontalAlignment="Left" Margin="0,8.75,0,36.5" Width="34.75" Data="M15,7.5 C15,11.6421 11.6421,15 7.5,15 C3.35786,15 0,11.6421 0,7.5 C0,3.35786 3.35786,0 7.5,0 C11.6421,0 15,3.35786 15,7.5 z M13.5,7.5 C13.5,10.8137 10.8137,13.5 7.5,13.5 C4.18629,13.5 1.5,10.8137 1.5,7.5 C1.5,4.18629 4.18629,1.5 7.5,1.5 C10.8137,1.5 13.5,4.18629 13.5,7.5 z M12.5,7.5 C12.5,10.2614 10.2614,12.5 7.5,12.5 C4.73858,12.5 2.5,10.2614 2.5,7.5 C2.5,4.73858 4.73858,2.5 7.5,2.5 C10.2614,2.5 12.5,4.73858 12.5,7.5 z" Stretch="Fill" UseLayoutRounding="False" RenderTransformOrigin="0,0" Fill="#FFFF2E2E" Stroke="#66FD4E4E" StrokeThickness="1.5">
                                    <Path.RenderTransform>
                                        <TranslateTransform/>
                                    </Path.RenderTransform>
                                </Path>
                            </Grid>
                            <Grid x:Name="VerticalTemplate" Margin="{StaticResource PhoneVerticalMargin}" HorizontalAlignment="Right" Width="45">
                                <Rectangle x:Name="VerticalTrack" Fill="{TemplateBinding Background}" IsHitTestVisible="False" Margin="18,0,18,0" Width="12"/>
                                <Rectangle x:Name="VerticalFill" Fill="{TemplateBinding Foreground}" IsHitTestVisible="False" Margin="18,0,18,0" Width="12">
                                    <Rectangle.Clip>
                                        <RectangleGeometry Rect="0, 0, 12, 6"/>
                                    </Rectangle.Clip>
                                </Rectangle>
                                <Path x:Name="VerticalCenterElement" Margin="5,-7.666,5.25,159.999" Data="M15,7.5 C15,11.6421 11.6421,15 7.5,15 C3.35786,15 0,11.6421 0,7.5 C0,3.35786 3.35786,0 7.5,0 C11.6421,0 15,3.35786 15,7.5 z M13.5,7.5 C13.5,10.8137 10.8137,13.5 7.5,13.5 C4.18629,13.5 1.5,10.8137 1.5,7.5 C1.5,4.18629 4.18629,1.5 7.5,1.5 C10.8137,1.5 13.5,4.18629 13.5,7.5 z M12.5,7.5 C12.5,10.2614 10.2614,12.5 7.5,12.5 C4.73858,12.5 2.5,10.2614 2.5,7.5 C2.5,4.73858 4.73858,2.5 7.5,2.5 C10.2614,2.5 12.5,4.73858 12.5,7.5 z" Stretch="Fill" UseLayoutRounding="False" RenderTransformOrigin="0,0" Fill="#FFFF2E2E" Stroke="#66FD4E4E" StrokeThickness="1.5">
                                    <Path.RenderTransform>
                                        <TranslateTransform/>
                                    </Path.RenderTransform>
                                </Path>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Application.Resources>
  <Application.ApplicationLifetimeObjects>
    <!--Required object that handles lifetime events for the application-->
    <shell:PhoneApplicationService Launching="Application_Launching" Closing="Application_Closing" Activated="Application_Activated" Deactivated="Application_Deactivated" />
  </Application.ApplicationLifetimeObjects>
</Application>